package net.sxnic.workflow.task.action;

import java.util.List;

import net.sxinfo.core.dao.hibernate3.HibernateCriteria;
import net.sxinfo.core.dao.hibernate3.HibernateDaoUtils;
import net.sxnic.workflow.task.Task;

import org.hibernate.criterion.Restrictions;

@SuppressWarnings("serial")
public class DealList extends TaskAction {

	// 为了保存待办公文中的类型，以便返回之后能正确显示类型
	private String type;

	private String title;

	private List<Task> list;

	public String execute() throws Exception {
		
		task = taskManager.get(taskId);
		
		HibernateCriteria hc = new HibernateCriteria();
		hc.add(HibernateDaoUtils.createHibernateOrder("creationDate", true));
		
		hc.add(Restrictions.eq("entityId", wfentity.getId()));
		
		List<Task> tempList = taskManager.getByCriteria(hc);
		
		
		
		return SUCCESS;
	}

	public List<Task> getList() {
		return list;
	}

	public void setList(List<Task> list) {
		this.list = list;
	}

	public String getTitle() {
		return title;
	}

	public void setTitle(String title) {
		this.title = title;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

}
